function y = datafilter_me8(x)
%DATAFILTER_ME8 Filters input x and returns output y.
y(1)=x(1);
y(2)=x(2);

% % Fc=5Hz Truncation 
% s(1) = 0.02;
% b(1) = 1;
% b(2) = 2;
% b(3) = 1;
% a(1) = 1;
% a(2) = -1.56;
% a(3) = 0.64;

% Fc=5Hz
s(1) = 0.020083365564211236;
b(1) = 1;
b(2) = 2;
b(3) = 1;
a(1) = 1;
a(2) = -1.5610180758007182;
a(3) = 0.64135153805756318;

% % Fc=3Hz
% s(1) = 0.0078202080334971915;
% b(1) = 1;
% b(2) = 2;
% b(3) = 1;
% a(1) = 1;
% a(2) = -1.7347257688092752;
% a(3) = 0.76600660094326389;

% Fc=2Hz
% s(1) = 0.0036216815149286421;
% b(1) = 1;
% b(2) = 2;
% b(3) = 1;
% a(1) = 1;
% a(2) = -1.8226949251963083;
% a(3) = 0.83718165125602262;

for i = 3 : length(x)
    
    y(i) = (s(1)*(b(1)*x(i)+b(2)*x(i-1)+b(3)*x(i-2))...
            -a(2)*y(i-1)-a(3)*y(i-2));
    
end


% [EOF]
